<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateProductUserLabelRelationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product_user_label_relations', function (Blueprint $table) {
            $table->id()->comment('商品用户标签关联表');
            $table->integer('product_id')->comment('商品id')->index();
            $table->integer('user_label_id')->comment('用户标签id')->index();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('product_user_label_relations');
    }
}
